import java.util.*;

public class TestCollection1 {
    public static void main(String[] args) {
        ArrayList<String> collection1 = new ArrayList<>();
        collection1.add("小猫");
        collection1.add("小狗");
        collection1.add("小猪");
        collection1.add("小鸟");
        System.out.println("What animals are there in the zoo:");
        System.out.println(collection1);
        System.out.println("\nAre there any pandas in the zoo？ "
                + collection1.contains("熊猫"));
        collection1.remove("小猪");
        System.out.println("\n" + collection1.size() +
                " \n" +
                "Number of animals");
        Collection<String> collection2 = new ArrayList<>();
        collection2.add("小鸡");
        collection2.add("小牛");
        collection2.add("小蛇");
        collection2.add("小猴");
        System.out.println("\nWhat animals are there in the zoo2:");
        System.out.println(collection2);
        ArrayList<String> c1 = (ArrayList<String>)(collection1.clone());
        c1.addAll(collection2);
        System.out.println("\nzoo in collection1 or collection2: ");
        System.out.println(c1);
        c1 = (ArrayList<String>)(collection1.clone());
        c1.removeAll(collection2);
        System.out.print("\n\n" +
                "The animals are in Zoo 1 but not in Zoo 2: ");
        System.out.println(c1);

    }
}
